<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width-device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="sie-edge" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>登录注册页面</title>

<!--图标库-->
<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>
<script type="text/javascript">
	function login() {
		var userName = $("#userName").val();
		var password = $("#password").val();
		var roleName = $("#roleName").val();
		if (userName == null || userName == "") {
			alert("用户名不能为空！");
			return;
		}
		if (password == null || password == "") {
			alert("密码不能为空！");
			return;
		}
		$("#adminlogin").submit();
	}
	function regist() {
		var userName = $("#userName").val();
		var password = $("#password").val();
		if (userName == null || userName == "") {
			alert("用户名不能为空！");
			return;
		}
		if (password == null || password == "") {
			alert("密码不能为空！");
			return;
		}
		$("#registlogin").submit();
	}
</script>
</head>

<body>

	<div class="container" id="container">
		<div class="form-container sign-up-container">
			<form id=registlogin method=post name=registlogin action="${pageContext.request.contextPath}/user/doRegist.do" method="post">
				<h1>第三方按钮注册</h1>
				<div class="social-container">
					<a href="#" class="social"> <ion-icon name="logo-facebook"></ion-icon>
					</a> <a href="#" class="social"> <ion-icon name="logo-github"></ion-icon>
					</a> <a href="#" class="social"> <ion-icon name="logo-apple"></ion-icon>
					</a>
				</div>
				<span>或使用您的电子邮箱注册</span> 
				<input type="text" name="userName" id="userName" placeholder="姓名">
				<input type="password" name="password" id="password" placeholder="密码">
				<button onclick="javascript:regist();return false;">注册</button>
			</form>
		</div>
		<div class="form-container sign-in-container">
			<form id=adminlogin method=post name=adminlogin
				action="${pageContext.request.contextPath}/user/checkLogin">
				<h1>第三方登录</h1>
				<div class="social-container">
					<a href="#" class="social"> <ion-icon name="logo-facebook"></ion-icon>
					</a> <a href="#" class="social"> <ion-icon name="logo-github"></ion-icon>
					</a> <a href="#" class="social"> <ion-icon name="logo-apple"></ion-icon>
					</a>
				</div>
				<span>或用邮箱登录</span> <input type="text" class=input
					value="${user.userName }" name="userName" id="userName" /> <input
					type="password" class=input value="${user.password }"
					name="password" id="password" />
				<button onclick="javascript:login();return false;">登录</button>
			</form>
		</div>
		<div class="overlay-container">
			<div class="overlay">
				<div class="overlay-panel overlay-left">
					<h1>欢迎回来</h1>
					<p>与我们保持联系请登录您的个人信息</p>
					<button class="ghost" id="signIn">登录</button>
				</div>
				<div class="overlay-panel overlay-right">
					<h1>欢迎光临</h1>
					<p>输入您的个人资料，并与我们一起开始旅程</p>
					<button class="ghost" id="signUp">注册</button>
				</div>
			</div>
		</div>
	</div>
	</form>
	<script src="js/script.js"></script>

</body>
</html>
